package com.banshuibao.bsb_android.activity;

import android.os.Bundle;
import android.widget.TextView;

import com.banshuibao.bsb_android.R;
import com.banshuibao.bsb_android.util.GetLoginInfo;
import com.banshuibao.bsb_android.util.TimeUtil;

public class MyVipCardActivity extends BaseActivity {

    private TextView validity;
    private GetLoginInfo getLoginInfo;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_my_vip_card);
        initView();
        getValidity();
    }
    public void initView(){
        setTitleText("我的会员卡");
        validity = findViewById(R.id.validity);
        validity.getPaint().setFakeBoldText(true);
    }

    public void getValidity(){
        getLoginInfo = GetLoginInfo.getLoginInfoInstance(this).readUser();
        long vipTime = getLoginInfo.getVipTime();
        String date = TimeUtil.format2(vipTime);
        validity.setText("截止有效期:"+date);
    }
}
